package restaurant;

import java.util.Date;

/**
 * Represents offer items. This class contains information about the discounts
 * offered by the restaurant and when they apply.
 * 
 * @author Odessa
 */

public class Offer
{

	/** The offer number. */
	private int offerNo;

	/** The date this offer starts. */
	private Date starts;

	/** The date this offer ends. */
	private Date ends;

	/** The description of this offer. */
	private String description;

	/** The discount provided by this offer. */
	private double discount;



	/**
	 * Instantiates a newly created offer.
	 * 
	 * @param offerNo the offer number of the offer to be created. Cannot be
	 *            null.
	 * @param starts the starting date of this offer.
	 * @param ends the ending date of this offer.
	 * @param description the description of this offer.
	 * @param discount the discount this offer provides.
	 */
	public Offer(int offerNo, Date starts, Date ends, String description,
			double discount) {
		this.offerNo = offerNo;
		this.starts = starts;
		this.ends = ends;
		this.description = description;
		this.discount = discount;
	}



	/**
	 * Gets the offer number of this offer. The offer number is used to uniquely
	 * identify each offer.
	 * 
	 * @return the offer number.
	 */
	public int getOfferNo()
	{
		return offerNo;
	}



	/**
	 * Gets the date this offer starts.
	 * 
	 * @return the starting date of this offer.
	 */
	public Date getStarts()
	{
		return starts;
	}



	/**
	 * Gets the date this offer ends.
	 * 
	 * @return the ending date of this offer.
	 */
	public Date getEnds()
	{
		return ends;
	}



	/**
	 * Gets the description of this offer.
	 * 
	 * @return the description of this offer.
	 */
	public String getDescription()
	{
		return description;
	}



	/**
	 * Gets the discount this offer provides.
	 * 
	 * @return the discount provided by this offer.
	 */
	public double getDiscount()
	{
		return discount;
	}
}
